/*
* INSANE - Interactive Structural Analysis Environment
*
* Copyright (C) 2003-2005
* Universidade Federal de Minas Gerais
* Escola de Engenharia
* Departamento de Engenharia de Estruturas
* 
* Author's email :    insane@dees.ufmg.br
* Author's website :  http://www.dees.ufmg.br/insane
* 
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or any later version.
* 
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
* GNU General Public License for more details.
* 
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
*/
package br.ufmg.dees.insane.materialMedia.material;

import java.awt.Color;
import java.io.Serializable;
import java.util.HashMap;

import br.ufmg.dees.insane.util.IMatrix;

/** A class representing ConcreteNB1
 * @author CENOURA!!!
 * @since 04/05/2005
 */
public class ConcreteNB1 implements Material, Serializable {
    
	private static final long serialVersionUID = 1L;

	/** The label of this Material.*/
    protected String label;
    
    /** The zero value of this Material.*/
    private static final double zero = 0.0001; 

	/** The values of this Material. */
    private HashMap<String, Double> materialValues;
	
	/** The keys for the Map. */
	/** The Concrete Fck (MPa). */
	public final String Fck = "Fck";
	
	/** The modulus of Poisson of this Material.*/
	public final String POISSON = "POISSON";
	
	/** The coefficient of thermal expansion of this Material. */
	public final String THERMAL_COEFF = "THERMAL_COEFF";
    
	/**Constructs a Concrete NB1 Material and sets its poisson to 0.2.*/
	public ConcreteNB1()
	{
	    this.label="ConcreteNB1";
		this.materialValues = new HashMap<String, Double>(4,1);
		this.setMaterialValues(this.POISSON, 0.2);
	}
	
	/* (non-Javadoc)
	 * @see br.ufmg.dees.insane.materialMedia.material.Material#getMaterialValues(java.lang.String)
	 */
	public Double getMaterialValues(String key) {
	      return (Double)materialValues.get(key);
	  }
	  
	  /* (non-Javadoc)
	 * @see br.ufmg.dees.insane.materialMedia.material.Material#materialValuesContainsKey(java.lang.String)
	 */
	public boolean materialValuesContainsKey(String key) {
	      return materialValues.containsKey(key);
	  }
	  
	  /* (non-Javadoc)
	 * @see br.ufmg.dees.insane.materialMedia.material.Material#setMaterialValues(java.lang.String, double)
	 */
	public void setMaterialValues(String key, double d) {
	      Double od = new Double(d);
	      materialValues.put(key, od);
	  }

    /* (non-Javadoc)
     * @see br.ufmg.dees.insane.materialMedia.material.Material#getPt()
     */
    public IMatrix getPt() {
        IMatrix Pt = new IMatrix(6,6);
        Pt.setElement(0,0,5600.0*Math.sqrt(this.getMaterialValues(this.Fck).doubleValue()));
        Pt.setElement(0,1,this.getMaterialValues(this.POISSON).doubleValue());
        Pt.setElement(0,2,this.getMaterialValues(this.POISSON).doubleValue());
        Pt.setElement(1,0,this.getMaterialValues(this.POISSON).doubleValue());
        Pt.setElement(1,1,5600.0*Math.sqrt(this.getMaterialValues(this.Fck).doubleValue()));
        Pt.setElement(1,2,this.getMaterialValues(this.POISSON).doubleValue());
        Pt.setElement(2,0,this.getMaterialValues(this.POISSON).doubleValue());
        Pt.setElement(2,1,this.getMaterialValues(this.POISSON).doubleValue());
        Pt.setElement(2,2,5600.0*Math.sqrt(this.getMaterialValues(this.Fck).doubleValue()));
        Pt.setElement(3,3,0.4*0.85*5600.0*Math.sqrt(this.getMaterialValues(this.Fck).doubleValue()));
        Pt.setElement(4,4,0.4*0.85*5600.0*Math.sqrt(this.getMaterialValues(this.Fck).doubleValue()));
        Pt.setElement(5,5,0.4*0.85*5600.0*Math.sqrt(this.getMaterialValues(this.Fck).doubleValue()));
        return Pt;
    }

    /* (non-Javadoc)
     * @see br.ufmg.dees.insane.materialMedia.material.Material#getPt(br.ufmg.dees.insane.util.IMatrix)
     */
    public IMatrix getPt(IMatrix e) {
        IMatrix Pt = new IMatrix(6,6);
        Pt.setElement(0,0,getPt11(e.getElement(0,0)));
        Pt.setElement(0,1,getPt12(e.getElement(0,1)));
        Pt.setElement(0,2,getPt13(e.getElement(0,2)));
        Pt.setElement(1,0,getPt21(e.getElement(1,0)));
        Pt.setElement(1,1,getPt22(e.getElement(1,1)));
        Pt.setElement(1,2,getPt23(e.getElement(1,2)));
        Pt.setElement(2,0,getPt31(e.getElement(2,0)));
        Pt.setElement(2,1,getPt32(e.getElement(2,1)));
        Pt.setElement(2,2,getPt33(e.getElement(2,2)));
        Pt.setElement(3,3,getPt44(e.getElement(0,1)));
        Pt.setElement(4,4,getPt55(e.getElement(0,2)));
        Pt.setElement(5,5,getPt66(e.getElement(1,2)));
        return Pt;
    }
    /* (non-Javadoc)
     * @see br.ufmg.dees.insane.materialMedia.material.Material#getPt11(double)
     */
    public double getPt11(double e11) {
        double x = 0;
        if(e11>0.0015){
            x=zero;
        	}
        if(e11>(0.9*0.7*0.3*Math.pow(this.getMaterialValues(this.Fck).doubleValue()*this.getMaterialValues(this.Fck).doubleValue(),1.0/3.0)/(5600.0*Math.sqrt(this.getMaterialValues(this.Fck).doubleValue())))&e11<=0.0015){
            x=0.1*0.7*0.3*Math.pow(this.getMaterialValues(this.Fck).doubleValue()*this.getMaterialValues(this.Fck).doubleValue(),1.0/3.0)/(0.0015-(0.9*0.7*0.3*Math.pow(this.getMaterialValues(this.Fck).doubleValue()*this.getMaterialValues(this.Fck).doubleValue(),1.0/3.0)/(5600.0*Math.sqrt(this.getMaterialValues(this.Fck).doubleValue()))));
            }
        if(e11<=0.9*0.7*0.3*Math.pow(this.getMaterialValues(this.Fck).doubleValue()*this.getMaterialValues(this.Fck).doubleValue(), 1.0/3.0)/(5600.0*Math.sqrt(this.getMaterialValues(this.Fck).doubleValue()))&e11>=0){
            x=5600.0*Math.sqrt(this.getMaterialValues(this.Fck).doubleValue());
            }
        if(e11<0&e11>=-0.002){
            x=0.85*(this.getMaterialValues(this.Fck).doubleValue()/1.4)*(1000*(1-(-e11)));
            }
        if(e11<-0.002&e11>=-0.0035){
            x=zero;
            }
        if(e11<-0.0035){
            x=zero;
        	}
        return x;
    }

    /* (non-Javadoc)
     * @see br.ufmg.dees.insane.materialMedia.material.Material#getPt12(double)
     */
    public double getPt12(double e12) {
        return this.getMaterialValues(this.POISSON).doubleValue();
    }

    /* (non-Javadoc)
     * @see br.ufmg.dees.insane.materialMedia.material.Material#getPt13(double)
     */
    public double getPt13(double e13) {
        return this.getMaterialValues(this.POISSON).doubleValue();
    }

    /* (non-Javadoc)
     * @see br.ufmg.dees.insane.materialMedia.material.Material#getPt14(double)
     */
    public double getPt14(double e14) {
        
        return zero;
    }

    /* (non-Javadoc)
     * @see br.ufmg.dees.insane.materialMedia.material.Material#getPt15(double)
     */
    public double getPt15(double e15) {
        
        return zero;
    }

    /* (non-Javadoc)
     * @see br.ufmg.dees.insane.materialMedia.material.Material#getPt16(double)
     */
    public double getPt16(double e16) {
        
        return zero;
    }

    /* (non-Javadoc)
     * @see br.ufmg.dees.insane.materialMedia.material.Material#getPt21(double)
     */
    public double getPt21(double e21) {
        return this.getMaterialValues(this.POISSON).doubleValue();
    }

    /* (non-Javadoc)
     * @see br.ufmg.dees.insane.materialMedia.material.Material#getPt22(double)
     */
    public double getPt22(double e22) {
        double x = 0;
        if(e22>0.0015){
            x=zero;
            }
        if(e22>(0.9*0.7*0.3*Math.pow(this.getMaterialValues(this.Fck).doubleValue()*this.getMaterialValues(this.Fck).doubleValue(),1.0/3.0)/(5600.0*Math.sqrt(this.getMaterialValues(this.Fck).doubleValue())))&e22<=0.0015){
            x=0.1*0.7*0.3*Math.pow(this.getMaterialValues(this.Fck).doubleValue()*this.getMaterialValues(this.Fck).doubleValue(),1.0/3.0)/(0.0015-(0.9*0.7*0.3*Math.pow(this.getMaterialValues(this.Fck).doubleValue()*this.getMaterialValues(this.Fck).doubleValue(),1.0/3.0)/(5600.0*Math.sqrt(this.getMaterialValues(this.Fck).doubleValue()))));
            }
        if(e22<=0.9*0.7*0.3*Math.pow(this.getMaterialValues(this.Fck).doubleValue()*this.getMaterialValues(this.Fck).doubleValue(), 1.0/3.0)/(5600.0*Math.sqrt(this.getMaterialValues(this.Fck).doubleValue()))&e22>=0){
            x=5600.0*Math.sqrt(this.getMaterialValues(this.Fck).doubleValue());
            }
        if(e22<0&e22>=-0.002){
            x=0.85*(this.getMaterialValues(this.Fck).doubleValue()/1.4)*(1000*(1-(-e22)));
            }
        if(e22<-0.002&e22>=-0.0035){
            x=zero;
            }
        if(e22<-0.0035){
            x=zero;
            }
        return x;
    }

    /* (non-Javadoc)
     * @see br.ufmg.dees.insane.materialMedia.material.Material#getPt23(double)
     */
    public double getPt23(double e23) {
        return this.getMaterialValues(this.POISSON).doubleValue();
    }

    /* (non-Javadoc)
     * @see br.ufmg.dees.insane.materialMedia.material.Material#getPt24(double)
     */
    public double getPt24(double e24) {
        
        return zero;
    }

    /* (non-Javadoc)
     * @see br.ufmg.dees.insane.materialMedia.material.Material#getPt25(double)
     */
    public double getPt25(double e25) {
        
        return zero;
    }

    /* (non-Javadoc)
     * @see br.ufmg.dees.insane.materialMedia.material.Material#getPt26(double)
     */
    public double getPt26(double e26) {
        
        return zero;
    }

    /* (non-Javadoc)
     * @see br.ufmg.dees.insane.materialMedia.material.Material#getPt31(double)
     */
    public double getPt31(double e31) {
        return this.getMaterialValues(this.POISSON).doubleValue();
        }

    /* (non-Javadoc)
     * @see br.ufmg.dees.insane.materialMedia.material.Material#getPt32(double)
     */
    public double getPt32(double e32) {
        return this.getMaterialValues(this.POISSON).doubleValue();
    }

    /* (non-Javadoc)
     * @see br.ufmg.dees.insane.materialMedia.material.Material#getPt33(double)
     */
    public double getPt33(double e33) {
        double x = 0;
        if(e33>0.0015){
            x=zero;
            }
        if(e33>(0.9*0.7*0.3*Math.pow(this.getMaterialValues(this.Fck).doubleValue()*this.getMaterialValues(this.Fck).doubleValue(),1.0/3.0)/(5600.0*Math.sqrt(this.getMaterialValues(this.Fck).doubleValue())))&e33<=0.0015){
            x=0.1*0.7*0.3*Math.pow(this.getMaterialValues(this.Fck).doubleValue()*this.getMaterialValues(this.Fck).doubleValue(),1.0/3.0)/(0.0015-(0.9*0.7*0.3*Math.pow(this.getMaterialValues(this.Fck).doubleValue()*this.getMaterialValues(this.Fck).doubleValue(),1.0/3.0)/(5600.0*Math.sqrt(this.getMaterialValues(this.Fck).doubleValue()))));
            }
        if(e33<=0.9*0.7*0.3*Math.pow(this.getMaterialValues(this.Fck).doubleValue()*this.getMaterialValues(this.Fck).doubleValue(), 1.0/3.0)/(5600.0*Math.sqrt(this.getMaterialValues(this.Fck).doubleValue()))&e33>=0){
            x=5600.0*Math.sqrt(this.getMaterialValues(this.Fck).doubleValue());
            }
        if(e33<0&e33>=-0.002){
            x=0.85*(this.getMaterialValues(this.Fck).doubleValue()/1.4)*(1000*(1-(-e33)));
            }
        if(e33<-0.002&e33>=-0.0035){
            x=zero;
            }
        if(e33<-0.0035){
            x=zero;
            }
        return x;
        }

    /* (non-Javadoc)
     * @see br.ufmg.dees.insane.materialMedia.material.Material#getPt34(double)
     */
    public double getPt34(double e34) {
        
        return zero;
    }

    /* (non-Javadoc)
     * @see br.ufmg.dees.insane.materialMedia.material.Material#getPt35(double)
     */
    public double getPt35(double e35) {
        
        return zero;
    }

    /* (non-Javadoc)
     * @see br.ufmg.dees.insane.materialMedia.material.Material#getPt36(double)
     */
    public double getPt36(double e36) {
        
        return zero;
    }

    /* (non-Javadoc)
     * @see br.ufmg.dees.insane.materialMedia.material.Material#getPt41(double)
     */
    public double getPt41(double e41) {
        
        return zero;
    }

    /* (non-Javadoc)
     * @see br.ufmg.dees.insane.materialMedia.material.Material#getPt42(double)
     */
    public double getPt42(double e42) {
        
        return zero;
    }

    /* (non-Javadoc)
     * @see br.ufmg.dees.insane.materialMedia.material.Material#getPt43(double)
     */
    public double getPt43(double e43) {
        
        return zero;
    }

    /* (non-Javadoc)
     * @see br.ufmg.dees.insane.materialMedia.material.Material#getPt44(double)
     */
    public double getPt44(double e44) {
        return 0.4*0.85*5600.0*Math.sqrt(this.getMaterialValues(this.Fck).doubleValue());
    }

    /* (non-Javadoc)
     * @see br.ufmg.dees.insane.materialMedia.material.Material#getPt45(double)
     */
    public double getPt45(double e45) {
        
        return zero;
    }

    /* (non-Javadoc)
     * @see br.ufmg.dees.insane.materialMedia.material.Material#getPt46(double)
     */
    public double getPt46(double e46) {
        
        return zero;
    }

    /* (non-Javadoc)
     * @see br.ufmg.dees.insane.materialMedia.material.Material#getPt51(double)
     */
    public double getPt51(double e51) {
        
        return zero;
    }

    /* (non-Javadoc)
     * @see br.ufmg.dees.insane.materialMedia.material.Material#getPt52(double)
     */
    public double getPt52(double e52) {
        
        return zero;
    }

    /* (non-Javadoc)
     * @see br.ufmg.dees.insane.materialMedia.material.Material#getPt53(double)
     */
    public double getPt53(double e53) {
        
        return zero;
    }

    /* (non-Javadoc)
     * @see br.ufmg.dees.insane.materialMedia.material.Material#getPt54(double)
     */
    public double getPt54(double e54) {
        
        return zero;
    }

    /* (non-Javadoc)
     * @see br.ufmg.dees.insane.materialMedia.material.Material#getPt55(double)
     */
    public double getPt55(double e55) {
        return 0.4*0.85*5600.0*Math.sqrt(this.getMaterialValues(this.Fck).doubleValue());
        }

    /* (non-Javadoc)
     * @see br.ufmg.dees.insane.materialMedia.material.Material#getPt56(double)
     */
    public double getPt56(double e56) {
        
        return zero;
    }

    /* (non-Javadoc)
     * @see br.ufmg.dees.insane.materialMedia.material.Material#getPt61(double)
     */
    public double getPt61(double e61) {
        
        return zero;
    }

    /* (non-Javadoc)
     * @see br.ufmg.dees.insane.materialMedia.material.Material#getPt62(double)
     */
    public double getPt62(double e62) {
        
        return zero;
    }

    /* (non-Javadoc)
     * @see br.ufmg.dees.insane.materialMedia.material.Material#getPt63(double)
     */
    public double getPt63(double e63) {
        
        return zero;
    }

    /* (non-Javadoc)
     * @see br.ufmg.dees.insane.materialMedia.material.Material#getPt64(double)
     */
    public double getPt64(double e64) {
        
        return zero;
    }

    /* (non-Javadoc)
     * @see br.ufmg.dees.insane.materialMedia.material.Material#getPt65(double)
     */
    public double getPt65(double e65) {
        
        return zero;
    }

    /* (non-Javadoc)
     * @see br.ufmg.dees.insane.materialMedia.material.Material#getPt66(double)
     */
    public double getPt66(double e66) {
        return 0.4*0.85*5600.0*Math.sqrt(this.getMaterialValues(this.Fck).doubleValue());
        }

    /* (non-Javadoc)
     * @see br.ufmg.dees.insane.materialMedia.material.Material#getPs()
     */
    public IMatrix getPs() {
        IMatrix Ps = new IMatrix(6,6);
        Ps.setElement(0,0,5600.0*Math.sqrt(this.getMaterialValues(this.Fck).doubleValue()));
        Ps.setElement(0,1,this.getMaterialValues(this.POISSON).doubleValue());
        Ps.setElement(0,2,this.getMaterialValues(this.POISSON).doubleValue());
        Ps.setElement(1,0,this.getMaterialValues(this.POISSON).doubleValue());
        Ps.setElement(1,1,5600.0*Math.sqrt(this.getMaterialValues(this.Fck).doubleValue()));
        Ps.setElement(1,2,this.getMaterialValues(this.POISSON).doubleValue());
        Ps.setElement(2,0,this.getMaterialValues(this.POISSON).doubleValue());
        Ps.setElement(2,1,this.getMaterialValues(this.POISSON).doubleValue());
        Ps.setElement(2,2,5600.0*Math.sqrt(this.getMaterialValues(this.Fck).doubleValue()));
        Ps.setElement(3,3,0.4*0.85*5600.0*Math.sqrt(this.getMaterialValues(this.Fck).doubleValue()));
        Ps.setElement(4,4,0.4*0.85*5600.0*Math.sqrt(this.getMaterialValues(this.Fck).doubleValue()));
        Ps.setElement(5,5,0.4*0.85*5600.0*Math.sqrt(this.getMaterialValues(this.Fck).doubleValue()));
        return Ps;
    }

    /* (non-Javadoc)
     * @see br.ufmg.dees.insane.materialMedia.material.Material#getPs(br.ufmg.dees.insane.util.IMatrix)
     */
    public IMatrix getPs(IMatrix e) {
        IMatrix Ps = new IMatrix(6,6);
        Ps.setElement(0,0,getPs11(e.getElement(0,0)));
        Ps.setElement(0,1,getPs12(e.getElement(0,1)));
        Ps.setElement(0,2,getPs13(e.getElement(0,2)));
        Ps.setElement(1,0,getPs21(e.getElement(1,0)));
        Ps.setElement(1,1,getPs22(e.getElement(1,1)));
        Ps.setElement(1,2,getPs23(e.getElement(1,2)));
        Ps.setElement(2,0,getPs31(e.getElement(2,0)));
        Ps.setElement(2,1,getPs32(e.getElement(2,1)));
        Ps.setElement(2,2,getPs33(e.getElement(2,2)));
        Ps.setElement(3,3,getPs44(e.getElement(0,1)));
        Ps.setElement(4,4,getPt55(e.getElement(0,2)));
        Ps.setElement(5,5,getPt66(e.getElement(1,2)));
        return Ps;
    }

    /* (non-Javadoc)
     * @see br.ufmg.dees.insane.materialMedia.material.Material#getPs11(double)
     */
    public double getPs11(double e11) {
        double x = 0;
        if(e11>0.0015){
            x=zero;
        	}
        if(e11>0.9*0.7*0.3*Math.pow(this.getMaterialValues(this.Fck).doubleValue()*this.getMaterialValues(this.Fck).doubleValue(),1.0/3.0)/(5600.0*Math.sqrt(this.getMaterialValues(this.Fck).doubleValue()))&e11<=0.0015){
            x= ((0.7*0.3*Math.pow(this.getMaterialValues(this.Fck).doubleValue()*this.getMaterialValues(this.Fck).doubleValue(),1.0/3.0))/(0.0015-(0.9*0.7*0.3*Math.pow(this.getMaterialValues(this.Fck).doubleValue()*this.getMaterialValues(this.Fck).doubleValue(),1.0/3.0)/(5600.0*Math.sqrt(this.getMaterialValues(this.Fck).doubleValue())))))*(0.1*e11+0.00135-(0.9*0.7*0.3*Math.pow(this.getMaterialValues(this.Fck).doubleValue()*this.getMaterialValues(this.Fck).doubleValue(),1.0/3.0)/(5600.0*Math.sqrt(this.getMaterialValues(this.Fck).doubleValue()))))/e11;
            }
        if(e11<=0.9*0.7*0.3*Math.pow(this.getMaterialValues(this.Fck).doubleValue()*this.getMaterialValues(this.Fck).doubleValue(),1.0/3.0)/(5600.0*Math.sqrt(this.getMaterialValues(this.Fck).doubleValue()))&e11>=0){
            x=5600.0*Math.sqrt(this.getMaterialValues(this.Fck).doubleValue());
            }
        if(e11<0&e11>=-0.002){
            x=(0.85*(this.getMaterialValues(this.Fck).doubleValue()/1.4)*(1.0-((1.0-(-e11/0.002))*(1.0-(-e11/0.002)))))/-e11;
            }
        if(e11<-0.002&e11>=-0.0035){
            x=(0.85*(this.getMaterialValues(this.Fck).doubleValue()/1.4))/-e11;
            }
        if(e11<-0.0035){
            x=zero;
        	}
        return x;
    }

    /* (non-Javadoc)
     * @see br.ufmg.dees.insane.materialMedia.material.Material#getPs12(double)
     */
    public double getPs12(double e12) {
        return this.getMaterialValues(this.POISSON).doubleValue();
    }

    /* (non-Javadoc)
     * @see br.ufmg.dees.insane.materialMedia.material.Material#getPs13(double)
     */
    public double getPs13(double e13) {
        return this.getMaterialValues(this.POISSON).doubleValue();
    }

    /* (non-Javadoc)
     * @see br.ufmg.dees.insane.materialMedia.material.Material#getPs14(double)
     */
    public double getPs14(double e14) {
        
        return zero;
    }

    /* (non-Javadoc)
     * @see br.ufmg.dees.insane.materialMedia.material.Material#getPs15(double)
     */
    public double getPs15(double e15) {
        
        return zero;
    }

    /* (non-Javadoc)
     * @see br.ufmg.dees.insane.materialMedia.material.Material#getPs16(double)
     */
    public double getPs16(double e16) {
        
        return zero;
    }

    /* (non-Javadoc)
     * @see br.ufmg.dees.insane.materialMedia.material.Material#getPs21(double)
     */
    public double getPs21(double e21) {
        return this.getMaterialValues(this.POISSON).doubleValue();
    }

    /* (non-Javadoc)
     * @see br.ufmg.dees.insane.materialMedia.material.Material#getPs22(double)
     */
    public double getPs22(double e22) {
        double x = 0;
        if(e22>0.0015){
            x=zero;
            }
        if(e22>0.9*0.7*0.3*Math.pow(this.getMaterialValues(this.Fck).doubleValue()*this.getMaterialValues(this.Fck).doubleValue(),1.0/3.0)/(5600.0*Math.sqrt(this.getMaterialValues(this.Fck).doubleValue()))&e22<=0.0015){
            x= ((0.7*0.3*Math.pow(this.getMaterialValues(this.Fck).doubleValue()*this.getMaterialValues(this.Fck).doubleValue(),1.0/3.0))/(0.0015-(0.9*0.7*0.3*Math.pow(this.getMaterialValues(this.Fck).doubleValue()*this.getMaterialValues(this.Fck).doubleValue(),1.0/3.0)/(5600.0*Math.sqrt(this.getMaterialValues(this.Fck).doubleValue())))))*(0.1*e22+0.00135-(0.9*0.7*0.3*Math.pow(this.getMaterialValues(this.Fck).doubleValue()*this.getMaterialValues(this.Fck).doubleValue(),1.0/3.0)/(5600.0*Math.sqrt(this.getMaterialValues(this.Fck).doubleValue()))))/e22;
            }
        if(e22<=0.9*0.7*0.3*Math.pow(this.getMaterialValues(this.Fck).doubleValue()*this.getMaterialValues(this.Fck).doubleValue(),1.0/3.0)/(5600.0*Math.sqrt(this.getMaterialValues(this.Fck).doubleValue()))&e22>=0){
            x=5600.0*Math.sqrt(this.getMaterialValues(this.Fck).doubleValue());
            }
        if(e22<0&e22>=-0.002){
            x=(0.85*(this.getMaterialValues(this.Fck).doubleValue()/1.4)*(1.0-((1.0-(-e22/0.002))*(1.0-(-e22/0.002)))))/-e22;
            }
        if(e22<-0.002&e22>=-0.0035){
            x=(0.85*(this.getMaterialValues(this.Fck).doubleValue()/1.4))/-e22;
            }
        if(e22<-0.0035){
            x=zero;
            }
        return x;
    }

    /* (non-Javadoc)
     * @see br.ufmg.dees.insane.materialMedia.material.Material#getPs23(double)
     */
    public double getPs23(double e23) {
        return this.getMaterialValues(this.POISSON).doubleValue();
    }

    /* (non-Javadoc)
     * @see br.ufmg.dees.insane.materialMedia.material.Material#getPs24(double)
     */
    public double getPs24(double e24) {
        
        return zero;
    }

    /* (non-Javadoc)
     * @see br.ufmg.dees.insane.materialMedia.material.Material#getPs25(double)
     */
    public double getPs25(double e25) {
        
        return zero;
    }

    /* (non-Javadoc)
     * @see br.ufmg.dees.insane.materialMedia.material.Material#getPs26(double)
     */
    public double getPs26(double e26) {
        
        return zero;
    }

    /* (non-Javadoc)
     * @see br.ufmg.dees.insane.materialMedia.material.Material#getPs31(double)
     */
    public double getPs31(double e31) {
        return this.getMaterialValues(this.POISSON).doubleValue();
    }

    /* (non-Javadoc)
     * @see br.ufmg.dees.insane.materialMedia.material.Material#getPs32(double)
     */
    public double getPs32(double e32) {
        return this.getMaterialValues(this.POISSON).doubleValue();    }

    /* (non-Javadoc)
     * @see br.ufmg.dees.insane.materialMedia.material.Material#getPs33(double)
     */
    public double getPs33(double e33) {
        double x = 0;
        if(e33>0.0015){
            x=zero;
            }
        if(e33>0.9*0.7*0.3*Math.pow(this.getMaterialValues(this.Fck).doubleValue()*this.getMaterialValues(this.Fck).doubleValue(),1.0/3.0)/(5600.0*Math.sqrt(this.getMaterialValues(this.Fck).doubleValue()))&e33<=0.0015){
            x= ((0.7*0.3*Math.pow(this.getMaterialValues(this.Fck).doubleValue()*this.getMaterialValues(this.Fck).doubleValue(),1.0/3.0))/(0.0015-(0.9*0.7*0.3*Math.pow(this.getMaterialValues(this.Fck).doubleValue()*this.getMaterialValues(this.Fck).doubleValue(),1.0/3.0)/(5600.0*Math.sqrt(this.getMaterialValues(this.Fck).doubleValue())))))*(0.1*e33+0.00135-(0.9*0.7*0.3*Math.pow(this.getMaterialValues(this.Fck).doubleValue()*this.getMaterialValues(this.Fck).doubleValue(),1.0/3.0)/(5600.0*Math.sqrt(this.getMaterialValues(this.Fck).doubleValue()))))/e33;
            }
        if(e33<=0.9*0.7*0.3*Math.pow(this.getMaterialValues(this.Fck).doubleValue()*this.getMaterialValues(this.Fck).doubleValue(),1.0/3.0)/(5600.0*Math.sqrt(this.getMaterialValues(this.Fck).doubleValue()))&e33>=0){
            x=5600.0*Math.sqrt(this.getMaterialValues(this.Fck).doubleValue());
            }
        if(e33<0&e33>=-0.002){
            x=(0.85*(this.getMaterialValues(this.Fck).doubleValue()/1.4)*(1.0-((1.0-(-e33/0.002))*(1.0-(-e33/0.002)))))/-e33;
            }
        if(e33<-0.002&e33>=-0.0035){
            x=(0.85*(this.getMaterialValues(this.Fck).doubleValue()/1.4))/-e33;
            }
        if(e33<-0.0035){
            x=zero;
            }
        return x;
        }

    /* (non-Javadoc)
     * @see br.ufmg.dees.insane.materialMedia.material.Material#getPs34(double)
     */
    public double getPs34(double e34) {
        
        return zero;
    }

    /* (non-Javadoc)
     * @see br.ufmg.dees.insane.materialMedia.material.Material#getPs35(double)
     */
    public double getPs35(double e35) {
        
        return zero;
    }

    /* (non-Javadoc)
     * @see br.ufmg.dees.insane.materialMedia.material.Material#getPs36(double)
     */
    public double getPs36(double e36) {
        
        return zero;
    }

    /* (non-Javadoc)
     * @see br.ufmg.dees.insane.materialMedia.material.Material#getPs41(double)
     */
    public double getPs41(double e41) {
        
        return zero;
    }

    /* (non-Javadoc)
     * @see br.ufmg.dees.insane.materialMedia.material.Material#getPs42(double)
     */
    public double getPs42(double e42) {
        
        return zero;
    }

    /* (non-Javadoc)
     * @see br.ufmg.dees.insane.materialMedia.material.Material#getPs43(double)
     */
    public double getPs43(double e43) {
        
        return zero;
    }

    /* (non-Javadoc)
     * @see br.ufmg.dees.insane.materialMedia.material.Material#getPs44(double)
     */
    public double getPs44(double e44) {
        return 0.4*0.85*5600.0*Math.sqrt(this.getMaterialValues(this.Fck).doubleValue());
        }

    /* (non-Javadoc)
     * @see br.ufmg.dees.insane.materialMedia.material.Material#getPs45(double)
     */
    public double getPs45(double e45) {
        
        return zero;
    }

    /* (non-Javadoc)
     * @see br.ufmg.dees.insane.materialMedia.material.Material#getPs46(double)
     */
    public double getPs46(double e46) {
        
        return zero;
    }

    /* (non-Javadoc)
     * @see br.ufmg.dees.insane.materialMedia.material.Material#getPs51(double)
     */
    public double getPs51(double e51) {
        
        return zero;
    }

    /* (non-Javadoc)
     * @see br.ufmg.dees.insane.materialMedia.material.Material#getPs52(double)
     */
    public double getPs52(double e52) {
        
        return zero;
    }

    /* (non-Javadoc)
     * @see br.ufmg.dees.insane.materialMedia.material.Material#getPs53(double)
     */
    public double getPs53(double e53) {
        
        return zero;
    }

    /* (non-Javadoc)
     * @see br.ufmg.dees.insane.materialMedia.material.Material#getPs54(double)
     */
    public double getPs54(double e54) {
        
        return zero;
    }

    /* (non-Javadoc)
     * @see br.ufmg.dees.insane.materialMedia.material.Material#getPs55(double)
     */
    public double getPs55(double e55) {
        return 0.4*0.85*5600.0*Math.sqrt(this.getMaterialValues(this.Fck).doubleValue());
    }

    /* (non-Javadoc)
     * @see br.ufmg.dees.insane.materialMedia.material.Material#getPs56(double)
     */
    public double getPs56(double e56) {
        
        return zero;
    }

    /* (non-Javadoc)
     * @see br.ufmg.dees.insane.materialMedia.material.Material#getPs61(double)
     */
    public double getPs61(double e61) {
        
        return zero;
    }

    /* (non-Javadoc)
     * @see br.ufmg.dees.insane.materialMedia.material.Material#getPs62(double)
     */
    public double getPs62(double e62) {
        
        return zero;
    }

    /* (non-Javadoc)
     * @see br.ufmg.dees.insane.materialMedia.material.Material#getPs63(double)
     */
    public double getPs63(double e63) {
        
        return zero;
    }

    /* (non-Javadoc)
     * @see br.ufmg.dees.insane.materialMedia.material.Material#getPs64(double)
     */
    public double getPs64(double e64) {
        
        return zero;
    }

    /* (non-Javadoc)
     * @see br.ufmg.dees.insane.materialMedia.material.Material#getPs65(double)
     */
    public double getPs65(double e65) {
        
        return zero;
    }

    /* (non-Javadoc)
     * @see br.ufmg.dees.insane.materialMedia.material.Material#getPs66(double)
     */
    public double getPs66(double e66) {
        return 0.4*0.85*5600.0*Math.sqrt(this.getMaterialValues(this.Fck).doubleValue());
    }
    

    /* (non-Javadoc)
     * @see br.ufmg.dees.insane.materialMedia.material.Material#getUnload()
     */
    public IMatrix getUnload() {
        IMatrix Unload = new IMatrix(6,6);
        Unload.setElement(0,0,5600.0*Math.sqrt(this.getMaterialValues(this.Fck).doubleValue()));
        Unload.setElement(1,1,5600.0*Math.sqrt(this.getMaterialValues(this.Fck).doubleValue()));
        Unload.setElement(2,2,5600.0*Math.sqrt(this.getMaterialValues(this.Fck).doubleValue()));
        Unload.setElement(3,3,0.4*0.85*5600.0*Math.sqrt(this.getMaterialValues(this.Fck).doubleValue()));
        Unload.setElement(4,4,0.4*0.85*5600.0*Math.sqrt(this.getMaterialValues(this.Fck).doubleValue()));
        Unload.setElement(5,5,0.4*0.85*5600.0*Math.sqrt(this.getMaterialValues(this.Fck).doubleValue()));        
        return Unload;
    }

    /* (non-Javadoc)
     * @see br.ufmg.dees.insane.materialMedia.material.Material#getUnload(br.ufmg.dees.insane.util.IMatrix)
     */
    public IMatrix getUnload(IMatrix e) {
        return this.getUnload();
    }

    /* (non-Javadoc)
     * @see br.ufmg.dees.insane.materialMedia.material.Material#getLabel()
     */
    public String getLabel() {
        return label;
    }

    /* (non-Javadoc)
     * @see br.ufmg.dees.insane.materialMedia.material.Material#setLabel(java.lang.String)
     */
    public void setLabel(String m) {
        this.label = m;
    }

	/* (non-Javadoc)
	 * @see br.ufmg.dees.insane.materialMedia.material.Material#getColor()
	 */
	public Color getColor() {
		// TODO Auto-generated method stub
		return null;
	}

	/* (non-Javadoc)
	 * @see br.ufmg.dees.insane.materialMedia.material.Material#setColor(java.awt.Color)
	 */
	public void setColor(Color color) {
		// TODO Auto-generated method stub
		
	}
    
    /* (non-Javadoc)
     * @see br.ufmg.dees.insane.materialMedia.material.Material#getMaterialValues()
     */
    public HashMap getMaterialValues() {
        return this.materialValues;
    }
}
